/*
 * Dialog GUI - Change user details
 */

/*
 * UserAccountDialog.java
 *
 * 
 */
package Form;

import java.awt.Color;
import java.sql.Date;
import java.util.Vector;
import javax.swing.text.JTextComponent;

/**
 *
 * @author NTQuang
 */
public class UserAccountDialog extends javax.swing.JDialog {

    /** Creates new form UserAccountDialog */
    public UserAccountDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();


        setLocationRelativeTo(null);
        setVisible(true);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlUserAccount = new javax.swing.JPanel();
        lblBrush = new javax.swing.JLabel();
        lblUserName = new javax.swing.JLabel();
        txtUserName = new javax.swing.JTextField();
        lblGroupName = new javax.swing.JLabel();
        lblGroupID = new javax.swing.JLabel();
        lblFullName = new javax.swing.JLabel();
        lblBirthday = new javax.swing.JLabel();
        txtGroupID = new javax.swing.JTextField();
        txtFullName = new javax.swing.JTextField();
        txtBirthDate = new javax.swing.JTextField();
        lblPassword = new javax.swing.JLabel();
        lblConfirmPass = new javax.swing.JLabel();
        lblAddress = new javax.swing.JLabel();
        lblEmail = new javax.swing.JLabel();
        txtEmail = new javax.swing.JTextField();
        scpAddress = new javax.swing.JScrollPane();
        araAddress = new javax.swing.JTextArea();
        btnUpdate = new javax.swing.JButton();
        txtConfirmPassword = new javax.swing.JPasswordField();
        txtPassword = new javax.swing.JPasswordField();
        btnCancel = new javax.swing.JButton();
        txtGroupName = new javax.swing.JTextField();
        cboGender = new javax.swing.JComboBox();
        lblGender = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("User Account");
        getContentPane().setLayout(new java.awt.GridBagLayout());

        pnlUserAccount.setBackground(new java.awt.Color(255, 255, 255));
        pnlUserAccount.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "User Account", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 12), new java.awt.Color(3, 97, 145))); // NOI18N
        pnlUserAccount.setName("pnlUserAccount"); // NOI18N
        pnlUserAccount.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        lblBrush.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/cis/images/Banner_brush_mini.png"))); // NOI18N
        lblBrush.setName("lblBrush"); // NOI18N
        pnlUserAccount.add(lblBrush, new org.netbeans.lib.awtextra.AbsoluteConstraints(326, 386, 200, 210));

        lblUserName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblUserName.setText("User Name:");
        lblUserName.setName("lblUserName"); // NOI18N
        pnlUserAccount.add(lblUserName, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 65, -1, -1));

        txtUserName.setBackground(new java.awt.Color(240, 249, 255));
        txtUserName.setEditable(false);
        txtUserName.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtUserName.setForeground(new java.awt.Color(3, 97, 145));
        txtUserName.setName("txtUserName"); // NOI18N
        txtUserName.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtUserNameActionPerformed(evt);
            }
        });
        pnlUserAccount.add(txtUserName, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 62, 330, -1));

        lblGroupName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblGroupName.setText("Personal ID:");
        lblGroupName.setName("lblGroupName"); // NOI18N
        pnlUserAccount.add(lblGroupName, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 215, -1, 10));

        lblGroupID.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblGroupID.setText("Phone:");
        lblGroupID.setName("lblGroupID"); // NOI18N
        pnlUserAccount.add(lblGroupID, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 245, -1, -1));

        lblFullName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblFullName.setText("Full Name:");
        lblFullName.setName("lblFullName"); // NOI18N
        pnlUserAccount.add(lblFullName, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 185, -1, -1));

        lblBirthday.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblBirthday.setText("Birthday:");
        lblBirthday.setName("lblBirthday"); // NOI18N
        pnlUserAccount.add(lblBirthday, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 305, -1, -1));

        txtGroupID.setBackground(new java.awt.Color(240, 249, 255));
        txtGroupID.setEditable(false);
        txtGroupID.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtGroupID.setForeground(new java.awt.Color(3, 97, 145));
        txtGroupID.setName("txtGroupID"); // NOI18N
        pnlUserAccount.add(txtGroupID, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 211, 330, -1));

        txtFullName.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtFullName.setName("txtFullName"); // NOI18N
        pnlUserAccount.add(txtFullName, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 242, 330, -1));

        txtBirthDate.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtBirthDate.setName("txtBirthDate"); // NOI18N
        pnlUserAccount.add(txtBirthDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 301, 330, -1));

        lblPassword.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblPassword.setText("Password:");
        lblPassword.setName("lblPassword"); // NOI18N
        pnlUserAccount.add(lblPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 95, -1, -1));

        lblConfirmPass.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblConfirmPass.setText("Confirm Pass:");
        lblConfirmPass.setName("lblConfirmPass"); // NOI18N
        pnlUserAccount.add(lblConfirmPass, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 125, 80, -1));

        lblAddress.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblAddress.setText("Address:");
        lblAddress.setName("lblAddress"); // NOI18N
        pnlUserAccount.add(lblAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 365, -1, -1));

        lblEmail.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblEmail.setText("Email:");
        lblEmail.setName("lblEmail"); // NOI18N
        pnlUserAccount.add(lblEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 335, -1, -1));

        txtEmail.setBackground(new java.awt.Color(240, 249, 255));
        txtEmail.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtEmail.setName("txtEmail"); // NOI18N
        pnlUserAccount.add(txtEmail, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 331, 330, -1));

        scpAddress.setBackground(new java.awt.Color(255, 255, 255));
        scpAddress.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
        scpAddress.setName("scpAddress"); // NOI18N

        araAddress.setColumns(20);
        araAddress.setFont(new java.awt.Font("Tahoma", 0, 12));
        araAddress.setLineWrap(true);
        araAddress.setRows(2);
        araAddress.setWrapStyleWord(true);
        araAddress.setName("araAddress"); // NOI18N
        scpAddress.setViewportView(araAddress);

        pnlUserAccount.add(scpAddress, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 361, 330, 150));

        btnUpdate.setFont(new java.awt.Font("Tahoma", 0, 12));
        btnUpdate.setForeground(new java.awt.Color(3, 97, 145));
        btnUpdate.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/cis/images/btn_up.png"))); // NOI18N
        btnUpdate.setText("Update");
        btnUpdate.setMargin(new java.awt.Insets(0, 1, 0, 1));
        btnUpdate.setName("btnUpdate"); // NOI18N
        btnUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnUpdateActionPerformed(evt);
            }
        });
        pnlUserAccount.add(btnUpdate, new org.netbeans.lib.awtextra.AbsoluteConstraints(187, 542, 90, 30));

        txtConfirmPassword.setBackground(new java.awt.Color(240, 249, 255));
        txtConfirmPassword.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtConfirmPassword.setName("txtConfirmPassword"); // NOI18N
        pnlUserAccount.add(txtConfirmPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 122, 330, 20));

        txtPassword.setBackground(new java.awt.Color(240, 249, 255));
        txtPassword.setFont(new java.awt.Font("Tahoma", 0, 12));
        txtPassword.setName("txtPassword"); // NOI18N
        txtPassword.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtPasswordActionPerformed(evt);
            }
        });
        pnlUserAccount.add(txtPassword, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 92, 330, 20));

        btnCancel.setFont(new java.awt.Font("Tahoma", 0, 12));
        btnCancel.setForeground(new java.awt.Color(3, 97, 145));
        btnCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/aptech/cis/images/btn_cancel.png"))); // NOI18N
        btnCancel.setText("Exit");
        btnCancel.setMargin(new java.awt.Insets(0, 1, 0, 1));
        btnCancel.setName("btnCancel"); // NOI18N
        btnCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelActionPerformed(evt);
            }
        });
        pnlUserAccount.add(btnCancel, new org.netbeans.lib.awtextra.AbsoluteConstraints(296, 542, 70, 30));

        txtGroupName.setBackground(new java.awt.Color(240, 249, 255));
        txtGroupName.setEditable(false);
        txtGroupName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        txtGroupName.setForeground(new java.awt.Color(3, 97, 145));
        txtGroupName.setName("txtGroupName"); // NOI18N
        pnlUserAccount.add(txtGroupName, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 181, 330, -1));

        cboGender.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboGender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Male", "Female" }));
        cboGender.setName("cboGender"); // NOI18N
        pnlUserAccount.add(cboGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(136, 271, 100, -1));

        lblGender.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblGender.setText("Gender:");
        lblGender.setName("lblGender"); // NOI18N
        pnlUserAccount.add(lblGender, new org.netbeans.lib.awtextra.AbsoluteConstraints(46, 275, -1, -1));

        getContentPane().add(pnlUserAccount, new java.awt.GridBagConstraints());

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnUpdateActionPerformed
}//GEN-LAST:event_btnUpdateActionPerformed

    private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed
        dispose();
    }//GEN-LAST:event_btnCancelActionPerformed

private void txtUserNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUserNameActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtUserNameActionPerformed

private void txtPasswordActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPasswordActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_txtPasswordActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea araAddress;
    private javax.swing.JButton btnCancel;
    private javax.swing.JButton btnUpdate;
    private javax.swing.JComboBox cboGender;
    private javax.swing.JLabel lblAddress;
    private javax.swing.JLabel lblBirthday;
    private javax.swing.JLabel lblBrush;
    private javax.swing.JLabel lblConfirmPass;
    private javax.swing.JLabel lblEmail;
    private javax.swing.JLabel lblFullName;
    private javax.swing.JLabel lblGender;
    private javax.swing.JLabel lblGroupID;
    private javax.swing.JLabel lblGroupName;
    private javax.swing.JLabel lblPassword;
    private javax.swing.JLabel lblUserName;
    private javax.swing.JPanel pnlUserAccount;
    private javax.swing.JScrollPane scpAddress;
    private javax.swing.JTextField txtBirthDate;
    private javax.swing.JPasswordField txtConfirmPassword;
    private javax.swing.JTextField txtEmail;
    private javax.swing.JTextField txtFullName;
    private javax.swing.JTextField txtGroupID;
    private javax.swing.JTextField txtGroupName;
    private javax.swing.JPasswordField txtPassword;
    private javax.swing.JTextField txtUserName;
    // End of variables declaration//GEN-END:variables
}
